// packageH/deposit_group/component/foot/foot.js
Component({
  properties: {
    showReserve: {
      type: Boolean,
      value: false
    },
    showExtension: {
      type: Boolean,
      value: false
    },
    isNocar: {
      type: Boolean,
      value: false
    },
    cservice: {
      value: {},
      type: Object
    }
  },

  data: {
    show1: false
  },

  methods: {
    tapBuyBtn () {
      if (this.data.isNocar) {
        return;
      }
      this.triggerEvent("buyNow");
    },
    gotoindex() {
      wx.reLaunch({
        url: "/packageG/index/index",
      });
    },

    earnReward () {
      this.triggerEvent("earnreward");
    },


    handleContact(e) {
      console.log(e.detail.path);
      console.log(e.detail.query);
    },

    // 显示客服弹框
    showPop() {
      this.setData({
        show1: true,
      });
    },
    closePop () {
      this.setData({
        show1: false
      });
    },

    callPhone() {
      if (this.data.cservice.service_mobile) {
        wx.makePhoneCall({
          phoneNumber: this.data.cservice.service_mobile,
        });
      } else {
        app.tips('暂未开通人工电话');
      }
    },

  }
});
